<template>
	<div class="h-10 flex items-center gap-2">
		<div
			v-if="isGoback"
			class="flex justify-center items-center w-10 h-10 rounded-sm bg-bg-3 app-bg-react"
			@click="onClickGoBack">
			<base-icon name="back" size="20" />
		</div>
		<base-text :text="title" :textT="titleT" class="text-2xl text-t-1 app-font-bold" />
	</div>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router'
import BaseIcon from '@/components/base/icon/index.vue'
import BaseText from '@/components/base/text/index.vue'

defineProps({
	title: {
		type: String,
		default: ''
	},
	titleT: {
		type: String,
		default: ''
	},
	isGoback: {
		type: Boolean
	}
})

const router = useRouter()

const onClickGoBack = () => {
	router.go(-1)
}
</script>
